import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/insert_tb_base_measures_task_request_entity.dart';

InsertTbBaseMeasuresTaskRequestEntity $InsertTbBaseMeasuresTaskRequestEntityFromJson(Map<String, dynamic> json) {
  final InsertTbBaseMeasuresTaskRequestEntity insertTbBaseMeasuresTaskRequestEntity = InsertTbBaseMeasuresTaskRequestEntity();
  final String? checkCycle = jsonConvert.convert<String>(json['checkCycle']);
  if (checkCycle != null) {
    insertTbBaseMeasuresTaskRequestEntity.checkCycle = checkCycle;
  }
  final String? checkCycleUnit = jsonConvert.convert<String>(json['checkCycleUnit']);
  if (checkCycleUnit != null) {
    insertTbBaseMeasuresTaskRequestEntity.checkCycleUnit = checkCycleUnit;
  }
  final String? checkCycleUnitName = jsonConvert.convert<String>(json['checkCycleUnitName']);
  if (checkCycleUnitName != null) {
    insertTbBaseMeasuresTaskRequestEntity.checkCycleUnitName = checkCycleUnitName;
  }
  final List<InsertTbBaseMeasuresTaskRequestCheckCycleVoList>? checkCycleVoList = (json['checkCycleVoList'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<InsertTbBaseMeasuresTaskRequestCheckCycleVoList>(e) as InsertTbBaseMeasuresTaskRequestCheckCycleVoList).toList();
  if (checkCycleVoList != null) {
    insertTbBaseMeasuresTaskRequestEntity.checkCycleVoList = checkCycleVoList;
  }
  final String? controlMeasures = jsonConvert.convert<String>(json['controlMeasures']);
  if (controlMeasures != null) {
    insertTbBaseMeasuresTaskRequestEntity.controlMeasures = controlMeasures;
  }
  final String? controlMeasuresName = jsonConvert.convert<String>(json['controlMeasuresName']);
  if (controlMeasuresName != null) {
    insertTbBaseMeasuresTaskRequestEntity.controlMeasuresName = controlMeasuresName;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    insertTbBaseMeasuresTaskRequestEntity.id = id;
  }
  final String? instrumentId = jsonConvert.convert<String>(json['instrumentId']);
  if (instrumentId != null) {
    insertTbBaseMeasuresTaskRequestEntity.instrumentId = instrumentId;
  }
  final String? riskMeasureId = jsonConvert.convert<String>(json['riskMeasureId']);
  if (riskMeasureId != null) {
    insertTbBaseMeasuresTaskRequestEntity.riskMeasureId = riskMeasureId;
  }
  final String? riskMeasureIdName = jsonConvert.convert<String>(json['riskMeasureIdName']);
  if (riskMeasureIdName != null) {
    insertTbBaseMeasuresTaskRequestEntity.riskMeasureIdName = riskMeasureIdName;
  }
  final String? season = jsonConvert.convert<String>(json['season']);
  if (season != null) {
    insertTbBaseMeasuresTaskRequestEntity.season = season;
  }
  final String? troubleshootContent = jsonConvert.convert<String>(json['troubleshootContent']);
  if (troubleshootContent != null) {
    insertTbBaseMeasuresTaskRequestEntity.troubleshootContent = troubleshootContent;
  }
  final String? workDayType = jsonConvert.convert<String>(json['workDayType']);
  if (workDayType != null) {
    insertTbBaseMeasuresTaskRequestEntity.workDayType = workDayType;
  }
  final String? workDayTypeName = jsonConvert.convert<String>(json['workDayTypeName']);
  if (workDayTypeName != null) {
    insertTbBaseMeasuresTaskRequestEntity.workDayTypeName = workDayTypeName;
  }
  final String? workEndTime = jsonConvert.convert<String>(json['workEndTime']);
  if (workEndTime != null) {
    insertTbBaseMeasuresTaskRequestEntity.workEndTime = workEndTime;
  }
  final String? workKind = jsonConvert.convert<String>(json['workKind']);
  if (workKind != null) {
    insertTbBaseMeasuresTaskRequestEntity.workKind = workKind;
  }
  final String? workKindName = jsonConvert.convert<String>(json['workKindName']);
  if (workKindName != null) {
    insertTbBaseMeasuresTaskRequestEntity.workKindName = workKindName;
  }
  final String? workStartTime = jsonConvert.convert<String>(json['workStartTime']);
  if (workStartTime != null) {
    insertTbBaseMeasuresTaskRequestEntity.workStartTime = workStartTime;
  }
  final String? workType = jsonConvert.convert<String>(json['workType']);
  if (workType != null) {
    insertTbBaseMeasuresTaskRequestEntity.workType = workType;
  }
  final bool? isShowInputAnd = jsonConvert.convert<bool>(json['isShowInputAnd']);
  if (isShowInputAnd != null) {
    insertTbBaseMeasuresTaskRequestEntity.isShowInputAnd = isShowInputAnd;
  }
  final bool? isShowTime = jsonConvert.convert<bool>(json['isShowTime']);
  if (isShowTime != null) {
    insertTbBaseMeasuresTaskRequestEntity.isShowTime = isShowTime;
  }
  final bool? isShowSeason = jsonConvert.convert<bool>(json['isShowSeason']);
  if (isShowSeason != null) {
    insertTbBaseMeasuresTaskRequestEntity.isShowSeason = isShowSeason;
  }
  return insertTbBaseMeasuresTaskRequestEntity;
}

Map<String, dynamic> $InsertTbBaseMeasuresTaskRequestEntityToJson(InsertTbBaseMeasuresTaskRequestEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['checkCycle'] = entity.checkCycle;
  data['checkCycleUnit'] = entity.checkCycleUnit;
  data['checkCycleUnitName'] = entity.checkCycleUnitName;
  data['checkCycleVoList'] = entity.checkCycleVoList?.map((v) => v.toJson()).toList();
  data['controlMeasures'] = entity.controlMeasures;
  data['controlMeasuresName'] = entity.controlMeasuresName;
  data['id'] = entity.id;
  data['instrumentId'] = entity.instrumentId;
  data['riskMeasureId'] = entity.riskMeasureId;
  data['riskMeasureIdName'] = entity.riskMeasureIdName;
  data['season'] = entity.season;
  data['troubleshootContent'] = entity.troubleshootContent;
  data['workDayType'] = entity.workDayType;
  data['workDayTypeName'] = entity.workDayTypeName;
  data['workEndTime'] = entity.workEndTime;
  data['workKind'] = entity.workKind;
  data['workKindName'] = entity.workKindName;
  data['workStartTime'] = entity.workStartTime;
  data['workType'] = entity.workType;
  data['isShowInputAnd'] = entity.isShowInputAnd;
  data['isShowTime'] = entity.isShowTime;
  data['isShowSeason'] = entity.isShowSeason;
  return data;
}

extension InsertTbBaseMeasuresTaskRequestEntityExtension on InsertTbBaseMeasuresTaskRequestEntity {
  InsertTbBaseMeasuresTaskRequestEntity copyWith({
    String? checkCycle,
    String? checkCycleUnit,
    String? checkCycleUnitName,
    List<InsertTbBaseMeasuresTaskRequestCheckCycleVoList>? checkCycleVoList,
    String? controlMeasures,
    String? controlMeasuresName,
    String? id,
    String? instrumentId,
    String? riskMeasureId,
    String? riskMeasureIdName,
    String? season,
    String? troubleshootContent,
    String? workDayType,
    String? workDayTypeName,
    String? workEndTime,
    String? workKind,
    String? workKindName,
    String? workStartTime,
    String? workType,
    bool? isShowInputAnd,
    bool? isShowTime,
    bool? isShowSeason,
  }) {
    return InsertTbBaseMeasuresTaskRequestEntity()
      ..checkCycle = checkCycle ?? this.checkCycle
      ..checkCycleUnit = checkCycleUnit ?? this.checkCycleUnit
      ..checkCycleUnitName = checkCycleUnitName ?? this.checkCycleUnitName
      ..checkCycleVoList = checkCycleVoList ?? this.checkCycleVoList
      ..controlMeasures = controlMeasures ?? this.controlMeasures
      ..controlMeasuresName = controlMeasuresName ?? this.controlMeasuresName
      ..id = id ?? this.id
      ..instrumentId = instrumentId ?? this.instrumentId
      ..riskMeasureId = riskMeasureId ?? this.riskMeasureId
      ..riskMeasureIdName = riskMeasureIdName ?? this.riskMeasureIdName
      ..season = season ?? this.season
      ..troubleshootContent = troubleshootContent ?? this.troubleshootContent
      ..workDayType = workDayType ?? this.workDayType
      ..workDayTypeName = workDayTypeName ?? this.workDayTypeName
      ..workEndTime = workEndTime ?? this.workEndTime
      ..workKind = workKind ?? this.workKind
      ..workKindName = workKindName ?? this.workKindName
      ..workStartTime = workStartTime ?? this.workStartTime
      ..workType = workType ?? this.workType
      ..isShowInputAnd = isShowInputAnd ?? this.isShowInputAnd
      ..isShowTime = isShowTime ?? this.isShowTime
      ..isShowSeason = isShowSeason ?? this.isShowSeason;
  }
}

InsertTbBaseMeasuresTaskRequestCheckCycleVoList $InsertTbBaseMeasuresTaskRequestCheckCycleVoListFromJson(Map<String, dynamic> json) {
  final InsertTbBaseMeasuresTaskRequestCheckCycleVoList insertTbBaseMeasuresTaskRequestCheckCycleVoList = InsertTbBaseMeasuresTaskRequestCheckCycleVoList();
  final String? executeType = jsonConvert.convert<String>(json['executeType']);
  if (executeType != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.executeType = executeType;
  }
  final String? attribute = jsonConvert.convert<String>(json['attribute']);
  if (attribute != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.attribute = attribute;
  }
  final int? checkCycle = jsonConvert.convert<int>(json['checkCycle']);
  if (checkCycle != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.checkCycle = checkCycle;
  }
  final bool? isShowInputAnd = jsonConvert.convert<bool>(json['isShowInputAnd']);
  if (isShowInputAnd != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.isShowInputAnd = isShowInputAnd;
  }
  final String? checkCycleUnit = jsonConvert.convert<String>(json['checkCycleUnit']);
  if (checkCycleUnit != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.checkCycleUnit = checkCycleUnit;
  }
  final String? checkCycleUnitName = jsonConvert.convert<String>(json['checkCycleUnitName']);
  if (checkCycleUnitName != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.checkCycleUnitName = checkCycleUnitName;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.endTime = endTime;
  }
  final String? hourEndTime = jsonConvert.convert<String>(json['hourEndTime']);
  if (hourEndTime != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.hourEndTime = hourEndTime;
  }
  final String? hourStartTime = jsonConvert.convert<String>(json['hourStartTime']);
  if (hourStartTime != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.hourStartTime = hourStartTime;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.id = id;
  }
  final String? startTime = jsonConvert.convert<String>(json['startTime']);
  if (startTime != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.startTime = startTime;
  }
  final bool? isShowTime = jsonConvert.convert<bool>(json['isShowTime']);
  if (isShowTime != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.isShowTime = isShowTime;
  }
  final bool? isShowSeason = jsonConvert.convert<bool>(json['isShowSeason']);
  if (isShowSeason != null) {
    insertTbBaseMeasuresTaskRequestCheckCycleVoList.isShowSeason = isShowSeason;
  }
  return insertTbBaseMeasuresTaskRequestCheckCycleVoList;
}

Map<String, dynamic> $InsertTbBaseMeasuresTaskRequestCheckCycleVoListToJson(InsertTbBaseMeasuresTaskRequestCheckCycleVoList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['executeType'] = entity.executeType;
  data['attribute'] = entity.attribute;
  data['checkCycle'] = entity.checkCycle;
  data['isShowInputAnd'] = entity.isShowInputAnd;
  data['checkCycleUnit'] = entity.checkCycleUnit;
  data['checkCycleUnitName'] = entity.checkCycleUnitName;
  data['endTime'] = entity.endTime;
  data['hourEndTime'] = entity.hourEndTime;
  data['hourStartTime'] = entity.hourStartTime;
  data['id'] = entity.id;
  data['startTime'] = entity.startTime;
  data['isShowTime'] = entity.isShowTime;
  data['isShowSeason'] = entity.isShowSeason;
  return data;
}

extension InsertTbBaseMeasuresTaskRequestCheckCycleVoListExtension on InsertTbBaseMeasuresTaskRequestCheckCycleVoList {
  InsertTbBaseMeasuresTaskRequestCheckCycleVoList copyWith({
    String? executeType,
    String? attribute,
    int? checkCycle,
    bool? isShowInputAnd,
    String? checkCycleUnit,
    String? checkCycleUnitName,
    String? endTime,
    String? hourEndTime,
    String? hourStartTime,
    String? id,
    String? startTime,
    bool? isShowTime,
    bool? isShowSeason,
  }) {
    return InsertTbBaseMeasuresTaskRequestCheckCycleVoList()
      ..executeType = executeType ?? this.executeType
      ..attribute = attribute ?? this.attribute
      ..checkCycle = checkCycle ?? this.checkCycle
      ..isShowInputAnd = isShowInputAnd ?? this.isShowInputAnd
      ..checkCycleUnit = checkCycleUnit ?? this.checkCycleUnit
      ..checkCycleUnitName = checkCycleUnitName ?? this.checkCycleUnitName
      ..endTime = endTime ?? this.endTime
      ..hourEndTime = hourEndTime ?? this.hourEndTime
      ..hourStartTime = hourStartTime ?? this.hourStartTime
      ..id = id ?? this.id
      ..startTime = startTime ?? this.startTime
      ..isShowTime = isShowTime ?? this.isShowTime
      ..isShowSeason = isShowSeason ?? this.isShowSeason;
  }
}
